package cz.su.pod.ksocializer.client.ui.widget;

import com.google.gwt.core.client.GWT;
import com.google.gwt.event.dom.client.ClickHandler;
import com.google.gwt.event.shared.HandlerRegistration;
import com.google.gwt.uibinder.client.UiBinder;
import com.google.gwt.uibinder.client.UiField;
import com.google.gwt.user.client.ui.Composite;
import com.google.gwt.user.client.ui.PushButton;
import com.google.gwt.user.client.ui.Widget;

public class CreateButton extends Composite {

	private static CreateButtonUiBinder uiBinder = GWT
			.create(CreateButtonUiBinder.class);

	interface CreateButtonUiBinder extends UiBinder<Widget, CreateButton> {
	}
	
	@UiField
	PushButton button;

	public CreateButton() {
		initWidget(uiBinder.createAndBindUi(this));
	}		

	public void setText(String text) {
		button.setText(text);
	}

	public String getText() {
		return button.getText();
	}

	public HandlerRegistration addClickHandler(ClickHandler handler) {
		return button.addClickHandler(handler);
	}
}
